#!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
****************************************************
Project:python
Filename: youdaopan.py
Author:银河
Create: 2025/10/11 上午10:21 
Notes:
***************************************************
'''

import time
import os
import requests

class YouDaoPan:
    def __init__(self):
        # self.token = dict(os.environ)['aliToken']
        self.token = "__yadk_uid=neqBS11T2n3uK13b3BNhFZ16rZQmpaj7; _ga=GA1.2.751542509.1747632558; OUTFOX_SEARCH_USER_ID_NCOO=1365430460.8989916; OUTFOX_SEARCH_USER_ID=-1795305053@125.118.47.2; _ga_1264S2DBKC=GS2.2.s1747632559$o1$g0$t1747632559$j60$l0$h0; Hm_lvt_7fe66a8317b6d6f28c82b62b9f890118=1760149148; HMACCOUNT=F7711C0DE05510F7; hb_MA-B0D8-94CBE089C042_source=www.baidu.com; YNOTE_CSTK=wJHHY2L2; Hm_lvt_30b679eb2c90c60ff8679ce4ca562fcc=1760149809; Hm_lpvt_30b679eb2c90c60ff8679ce4ca562fcc=1760149809; Hm_lpvt_7fe66a8317b6d6f28c82b62b9f890118=1760149814; Hm_lvt_53c97531c41019c3315b44853946c2c9=1760149864; Hm_lpvt_53c97531c41019c3315b44853946c2c9=1760149864; YNOTE_USER=1; YNOTE_SESS=v2|21W63GoJ2mJZ0MTyRH6L0lm0fTukLJL0qz64PuP4Qz06yh4JSOfUG0puk4JFRHgLRUG6MgLhLzMRwyk4lGRHwL0YfO4eZ64zGR; YNOTE_LOGIN=3||1760151781453; UM_distinctid=199d13d118d19e-05fbdbb5d4289c8-26061851-1fa400-199d13d118e67c; _uetsid=764bbf50a64f11f0b7ad2f9e8cf08963|12xt5kb|2|g02|0|2110; _uetvid=764c0420a64f11f0846b87f46ef3b469|nvokv4|1760152106850|3|1|bat.bing.com/p/insights/c/j; gdxidpyhxdE=aM1mKky2nKTRRGob1ngQjkzxCtnG%2Bqcoe7QJtMWZ9v7Kmii6WPH%2F6AHTvif2yoRjdHPrt%2FLRJMVZ2awldfdbRC78e4l%5C5HIJemvzhvfl3DKJuAL6w0u3n%2BqmTnEJbjeIcVQ315Bhrac%5C5zPlC5pUMwN07NrDaHUTNw3CACH9xVjjo7Hp%3A1760153308623"
        self.hearder = {
            "Accept": "*/*",
            "Accept-Encoding": "gzip, deflate, br, zstd",
            "Accept-Language": "zh-CN,zh;q=0.9",
            "Cache-Control": "no-cache",
            "Connection": "keep-alive",
            "Cookie": self.token,
            "Host": "note.youdao.com",
            "Pragma": "no-cache",
            "Referer": "https://note.youdao.com/web/",
            "Sec-Fetch-Dest": "empty",
            "Sec-Fetch-Mode": "cors",
            "Sec-Fetch-Site": "same-origin",
            "User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36",
            "sec-ch-ua":"'Google Chrome';v='141','Not?A_Brand';v='8','Chromium';v='141'",
            "sec-ch-ua-mobile": "?0",
            "sec-ch-ua-platform": "'Windows'"
        }




    def tijiao(self):
        url = "http://note.youdao.com/yws/mapi/user?method=checkin"
        res = requests.post(url=url,headers=self.hearder).json()
        print(res)
    def weixin(self,content):
        data = {
            "title": "有道云盘签到提醒",
            "content": content
        }

        res = requests.post(url="http://yh.xuenn.cn/api/weixin/", data=data)
        if res.status_code == 200:
            print('pushplus推送成功')
            return 'pushplus推送成功'
        else:
            print('系统错误，pushplus推送失败')
            return '系统错误，pushplus推送失败'
    def main(self):
        self.tijiao()

if __name__ == '__main__':
    YouDaoPan().main()

